#include <iostream>

using namespace std;
//const:用const来防止误操作
struct Student {
    string name;//姓名
    int age;//年龄
    int score;//分数
};

void print(const struct Student *student) {
    cout << "姓名为" << student->name << ",年龄为" << student->age << ",分数为" << student->score << endl;
}

int main() {
    //创建结构体变量
    struct Student student = {"张三", 18, 95};
    //通过函数输出结构体变量的信息
    print(&student);
    return 0;
}
